﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Qcy.Jshj.Web.Helpers
{
    public class ApplicationTag : EnvironmentBase
    {
        private static readonly string path = string.Format("{0}Config/LanguageConfig.xml", HttpContext.Current.Request.PhysicalApplicationPath);
        private static XmlHelper xmlHelper;

        static ApplicationTag()
        {
            xmlHelper = new XmlHelper(path);
        }

        public static string GetTag(string tagName)
        {
            var element = xmlHelper.GetXElements(tagName);
            return IsChinese ? element.Attribute("Value").Value : element.Attribute("Name").Value;
        }
    }
}